package com.yuma.entity;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

@Data
@Component
@Scope("prototype")
public class Person {
    @Autowired
    private Dog dog;
    @Value("张三")
    private String name;

    public Person(){
        System.out.println("new ....");
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
